﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml;
using System.Data;
using System.IO;

namespace InfoPlayas
{
    public partial class _Default : System.Web.UI.Page
    {
        //http://aspspider.info/PROFOTEAM/PlayasService.asmx
        //http://localhost:1790/InfoPlayas.asmx
        localhost.InfoPlayas playas = new localhost.InfoPlayas();
        protected void Page_Load(object sender, EventArgs e)
        {
           

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
          
            TextBox2.Text = (playas.GetInfoPlaya(TextBox1.Text));
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(TextBox2.Text);

            
            DataSet ds = new DataSet();
            ds.ReadXml(new StringReader(TextBox2.Text));
            if (ds.Tables.Count > 1)
            {
                GridView1.DataSource = ds.Tables["Servicio"];
                GridView1.DataBind();
            }
            TextBox2.Text = "";
        }
    }
}
